<!doctype html>
<html lang="zh-CN" xmlns:th="http://www.thymeleaf.org">

<head>
	<meta charset="utf-8">
	<title>EDU问答平台个人中心</title>
	<link th:href="@{/user/css/base.css}" rel="stylesheet">
	<link th:href="@{/user/css/index.css}" rel="stylesheet">
	<link th:href="@{/user/css/style.css}" rel="stylesheet">
	<link th:href="@{/user/css/media.css}" rel="stylesheet">
	<link th:href="@{/res/layui/css/layui.css}"rel="stylesheet" >
	<script th:src="@{/assets/layui.js}"></script>
	<!--header-->
	<link rel="stylesheet" type="text/css" th:href="@{/home/styles/bootstrap4/bootstrap.min.css}">
	<link th:href="@{/home/plugins/font-awesome-4.7.0/css/font-awesome.min.css}" rel="stylesheet" type="text/css">
	<link rel="stylesheet" type="text/css" th:href="@{/home/plugins/OwlCarousel2-2.2.1/owl.carousel.css}">
	<link rel="stylesheet" type="text/css" th:href="@{/home/plugins/OwlCarousel2-2.2.1/owl.theme.default.css}">
	<link rel="stylesheet" type="text/css" th:href="@{/home/plugins/OwlCarousel2-2.2.1/animate.css}">
	<link rel="stylesheet" type="text/css" th:href="@{/home/plugins/jquery.mb.YTPlayer-3.1.12/jquery.mb.YTPlayer.css}">
	<link rel="stylesheet" type="text/css" th:href="@{/home/styles/main_styles.css}">
	<link rel="stylesheet" type="text/css" th:href="@{/home/styles/responsive.css}">

	<meta name="viewport" content="width=device-width, minimum-scale=1.0, maximum-scale=1.0">
</head>

<body style="background: #FFFFFF;">

	<h2>.</h2>
	<h2>.</h2>
	<header class="header" style="background: rgba(0,0,0,0.75);">

		<div class="container">
			<div class="row">
				<div class="col">
					<div class="header_content d-flex flex-row align-items-center justify-content-start">
						<div class="logo"><a href="#">EDU</a></div>
						<nav class="main_nav">
							<ul>
								<a th:href="@{/queryhomepage}">我的首页</a>
								<a th:href="@{/userquery}">我的问答</a>
								<a th:href="@{/userdownload}">我的下载</a>
								<a th:href="@{/uservideo}">我的视频</a>
								<a th:href="@{/userchat}">我的Chat</a>
							</ul>
						</nav>
						<div class="search_container ml-auto">
							<form action="#">
								<input type="search" class="header_search_input" required="required"
									   placeholder="Type to Search...">
								<img class="header_search_icon" th:src="@{/home/images/search.png}" alt="">
							</form>
							&nbsp;&nbsp;<a th:href="@{/login}">登录</a>&nbsp;|&nbsp;<a th:href="@{/register}">注册</a>
						</div>
						<div class="hamburger ml-auto menu_mm">
							<i class="fa fa-bars trans_200 menu_mm" aria-hidden="true"></i>
						</div>
					</div>
				</div>
			</div>
		</div>
	</header>
	<div class="ibody">
			<article>
				<div class="banner">
					<ul class="texts">
						<p>The best life is use of willing attitude, a happy-go-lucky life. </p>
						<p>最好的生活是用心甘情愿的态度，过随遇而安的生活。</p>
					</ul>
				</div>
				<div class="bloglist">
					<h2><p><a href="download.html" style="color: white;"><span>下载</span>明细</a></p></h2>
					<tbody th:each="resourcelist:${resourcelists}">
					<div style="width: 730px; height: 50px; font-size: 14px;font-weight: bold;margin-bottom: 15px;padding-bottom: 15px;">
						<ul>
							<p>
								<h2 th:text="${resourcelist.resourceName}">Java设计思想</h2></p>
							<p>&nbsp;&nbsp;上传者：<span th:text="${userinfo.username}">孙明</span>&nbsp;&nbsp;下载时间：<span th:text="${#dates.format(resourcelist.uploadTime, 'yyyy年MM月dd日 hh:mm:ss')}">2018-3-5</span>&nbsp;&nbsp;
								<a href="/" th:href="@{/download}">点击下载</a>
							</p>
							<hr/>
						</ul>
					</div>
					</tbody>
				</div>
				<!--分页-->
				<div style="padding-left: 225px">
					<div id="pagination">
					</div>
				</div>
			</article>
			<aside>
				<div class="avatar" style="background: url(user/images/004.jpg);"></div>
				<div class="topspaceinfo">
					<p th:text="${userinfo.username}">昵称：小李子</p>
					<p style="float:right"><a href="/" style="color: aliceblue;">点我修改个人信息</a></p>
				</div>
				<div class="tj_news">
					<h2><p class="tj_t1">最近浏览的文章</p></h2>
					<tbody th:each="resourcelist:${resourcelists}">
					<ul>
						<li>
							<a href="/" th:text="${resourcelist.resourceName}">犯错了怎么办？</a>
						</li>
					</ul>
					</tbody>
					<h2><p class="tj_t2">最近观看的视频</p></h2>
					<tbody th:each="resourcelist:${resourcelists}">
					<ul>
						<li>
							<a href="/" th:text="${resourcelist.resourceName}">犯错了怎么办？</a>
						</li>
					</ul>
					</tbody>
				</div>
			</aside>
			<script th:src="@{/user/js/silder.js}"></script>
			<div class="clear"></div>
			<!-- 清除浮动 -->
		</div>
	<script th:inline="javascript">
        /*<![CDATA[*/
        var count = [[${count}]];//总记录数
        var curr = [[${curr}]];//当前页
        var contextPath = [[${#request.getContextPath()}]]; //获取当前应用路径
        var username = [[${keyword}]];
        var count = [[${count}]]
        /*]]>*/
	</script>
	<script type="text/javascript">

        layui.use('laypage', function () {
            var laypage = layui.laypage;

            //执行一个laypage实例
            laypage.render({
                elem: 'pagination' //注意，这里的 data 是 ID，不用加 # 号
                , count: count //数据总数，从服务端得到
                , curr: curr
                , username: username
                , limit: 10
                , jump: function (obj, first) {
                    //obj包含了当前分页的所有参数，比如：
                    console.log(obj.curr); //得到当前页，以便向服务端请求对应页的数据。
                    console.log(obj.limit); //得到每页显示的条数
                    //首次不执行
                    if (!first) {
                        window.location.href = contextPath + "/useranswer?page=" + (obj.curr) + "&size=" + obj.limit
                    }
                }
            });
        });
	</script>
	</body>

</html>